package com.gzx.plugin.data.wckj.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.gzx.plugin.data.wckj.mapper.DataWckjYwyhidMapper;
import com.gzx.plugin.data.wckj.service.DataWckjYwyhidService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import vip.xiaonuo.common.util.CommonDateUtil;

/**
 * @author zjt
 * @description
 * @date 2025/2/13 18:07
 */
@Service
@DS("data")
@RequiredArgsConstructor
public class DataWckjYwyhidServiceImpl implements DataWckjYwyhidService {

    private final DataWckjYwyhidMapper dataWckjYwyhidMapper;

    /**
     * 是否开始同步数据
     *
     * @param projectCode
     * @return
     */
    @Override
    public int isStartSynchronization(String projectCode) {
        return dataWckjYwyhidMapper.getStatusCount(CommonDateUtil.getCurrentMonthFirstDay(), projectCode);
    }
}
